extensions/gegl-fixups: swap increments of src and dst in rgba8_rgb8
authorØyvind Kolås <pippin@gimp.org>
Wed, 4 Apr 2018 14:41:51 +0000 (16:41 +0200)
committerØyvind Kolås <pippin@gimp.org>
Wed, 4 Apr 2018 14:41:54 +0000 (16:41 +0200)
They were reversed, causing memory corruptions fixing bugs 794973 and 794972.

extensions/gegl-fixups.c

index d6ad91212ddb2b97efd727c6e3112354f0a708e1..fd0e6ed52c4f32e96c986bf11bcc283f13538d1c 100644 (file)
@@ -455,8 +455,8 @@ conv_rgba8_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
   while (n--)
     {
       *(unsigned int *) dst = (*(unsigned int *) src);
-      src   += 3;
-      dst   += 4;
+      src   += 4;
+      dst   += 3;
     }
   dst[0] = src[0];
   dst[1] = src[1];